                 <?php 
                       $recentDocuments = "";
                       $count = 1; 
                       $include_doc_id = $doc_id > 0 ? "AND doc_id != $doc_id" : "";
                       $query = mysql_query(sprintf("SELECT doc_name, doc_id FROM documents WHERE user_id = %d %s ORDER BY date_updated DESC LIMIT 5", $_SESSION['id'], $include_doc_id ));
                       while($nt=mysql_fetch_array($query))
                       { 
                           $recentDocuments .= "<p> 
                                 <span><a target='_blank' href='/indstudy/editor.php?doc_id=$nt[doc_id]'>$nt[doc_name]</a></span>
                                 </p>";
                           $count++;
                       } 
                    ?>
